// 用防抖来实现  长时间静默自动退出

import store from "@/store"; // 引入store
// import router from '@/router/index'     AutoJumb(router)
let timer;
export default (router) => {
  if (timer) clearTimeout(timer);
  if (router.currentRoute.value.path == "/login") {
    return;
  }
  timer = setTimeout(() => {
    store.dispatch("user/logout");
    // router.push('/login')
  }, 2000000);
};

